package com.yowasa.xiuxian.engine.item.miji;

import com.yowasa.xiuxian.annoations.Item;
import com.yowasa.xiuxian.engine.item.ItemInterface;
import com.yowasa.xiuxian.entity.bo.user.UserBO;
import com.yowasa.xiuxian.entity.enums.ItemTypeEnum;
import com.yowasa.xiuxian.exception.HandlerException;


@Item(name = "星海游鲸秘籍", type = ItemTypeEnum.MI_JI, price = 2000)
public class XingHaiYouJingBook implements ItemInterface {

    @Override
    public String desc() {
        return "记载着星海游鲸战技的修炼之法";
    }

    @Override
    public String effect(UserBO userBO) {
        if (userBO.getUserConfig().getCanStudyStrategies().contains("星海游鲸")) {
            throw new HandlerException("你已知晓了星海游鲸的修炼之法");
        }

        userBO.getUserConfig().getCanStudyStrategies().add("星海游鲸");
        return "你成功获取了[战技]星海游鲸的修习方法";
    }

}
